﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="PurchaseOrder.aspx.cs" Inherits="PurchaseOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%">
        <tr>
            <td style="height: 12px">
                <h3>
                    <u>Purchase Order Creation</u></h3>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnDashboard" runat="server" Text="Dashboard" PostBackUrl="~/WorkFlowDashBoard.aspx" />
                <asp:Button ID="btnCreatePurchaseOrder" runat="server" Text="New"
                    OnClick="btnCreatePurchaseOrder_Click" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="grdWorkFlows" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="Black" GridLines="Vertical" Width="100%" BackColor="White" 
                    BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px">
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <PagerTemplate>
                        <table border="0" cellpadding="0" cellspacing="0" align="center">
                            <tr>
                                <td class="pagerTabPadding">
                                    <table id="pagerOuterTable" class="pagerOuterTable" cellpadding="0" cellspacing="0"
                                        runat="server" align="center">
                                        <tr>
                                            <td>
                                                <table id="pagerInnerTable" cellpadding="2" cellspacing="0" runat="server">
                                                    <tr>
                                                        <td class="pageCounter">
                                                            <asp:Label ID="lblPageCounter" runat="server" Text=""></asp:Label>
                                                        </td>
                                                        <td class="pageFirstLast">
                                                            <asp:ImageButton ID="FirstPage" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/appimages/firstpage.gif"
                                                                CommandName="Page" CommandArgument="First" align="absmiddle" />&nbsp;<asp:LinkButton
                                                                    ID="lnkFirstPage" CssClass="pagerLink" runat="server" CommandName="Page" CommandArgument="First">First</asp:LinkButton>
                                                        </td>
                                                        <td class="pagePrevNextNumber">
                                                            <asp:ImageButton ID="imgPrevPage" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/appimages/prevpage.gif"
                                                                CommandName="Page" CommandArgument="Prev" />
                                                        </td>
                                                        <td class="pagePrevNextNumber">
                                                            <asp:ImageButton ID="imgNextPage" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/appimages/nextpage.gif"
                                                                CommandName="Page" CommandArgument="Next" />
                                                        </td>
                                                        <td class="pageFirstLast">
                                                            <asp:LinkButton ID="lnkLastPage" CssClass="pagerLink" CommandName="Page" CommandArgument="Last"
                                                                runat="server">Last</asp:LinkButton>&nbsp;<asp:ImageButton ID="LastPage" runat="server"
                                                                    ImageAlign="AbsMiddle" ImageUrl="~/appimages/lastpage.gif" align="absmiddle"
                                                                    CommandName="Page" CommandArgument="Last" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </PagerTemplate>
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="PurchaseOrderId" HeaderText="ID" ItemStyle-CssClass="GridFirstColumn">
                            <ItemStyle CssClass="GridFirstColumn"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="PurchaseOrderDate" HeaderText="Purchase Order Date" />
                        <asp:BoundField DataField="ItemName" HeaderText="Name" />
                        <asp:BoundField DataField="Itemquantity" HeaderText="Quantity" />
                        <asp:BoundField DataField="Price" HeaderText="Order Price" />
                        <asp:BoundField DataField="IsCredit" HeaderText="Credit" />
                        <asp:BoundField DataField="WorkFlowState" HeaderText="State" />
                        <asp:BoundField DataField="WorkFlowDate" HeaderText="WorkFlow Date" />
                        <asp:TemplateField HeaderText="Actions" ItemStyle-CssClass="ActionButtons">
                            <ItemTemplate>
                                <center>
                                    <asp:ImageButton ID="btnEdit" runat="server" CausesValidation="false" CommandName="approve"
                                        OnCommand="grdWorkFlows_RowCommand" CommandArgument='<%#Eval("WorkflowInstanceId")%>'
                                        ImageUrl="~/appimages/Edit.gif" ToolTip='Click to Approved' />
                                    <asp:ImageButton ID="btnRejected" runat="server" CausesValidation="false" CommandName="reject"
                                        OnCommand="grdWorkFlows_RowCommand" CommandArgument='<%#Eval("WorkflowInstanceId")%>'
                                        ImageUrl="~/appImages/Delete.gif" ToolTip='Click to Reject' />
                                </center>
                            </ItemTemplate>
                            <ItemStyle CssClass="ActionButtons"></ItemStyle>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="height: 12">
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="pnlRol" runat="server" Visible="false">
                    <table>
                        <tr>
                            <td>
                                Purchase Order ID
                            </td>
                            <td>
                                <asp:Label ID="lblOderId" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Workflow Instance ID
                            </td>
                            <td>
                                <asp:Label ID="lblInstanceId" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Item Name
                            </td>
                            <td>
                                <asp:TextBox ID="txtItemName" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Item Quantity
                            </td>
                            <td>
                                <asp:TextBox ID="txtItemQuantity" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Order Date
                            </td>
                            <td>
                                <asp:TextBox ID="txtOderDate" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Price
                            </td>
                            <td>
                                <asp:TextBox ID="txtPrice" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Credit Purchase
                            </td>
                            <td>
                                <asp:CheckBox ID="chkCredit" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
                                <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
